package org.zero.service.impl;

import com.alipay.api.AlipayApiException;
import com.fasterxml.jackson.core.JsonProcessingException;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.zero.manager.AlipayManager;
import org.zero.model.AlipayRequest;
import org.zero.service.PayService;

/**
 * @author Zero (cnzeropro@qq.com)
 * @date 2021/10/5 21:13
 */
@Service("payService")
public class PayServiceImpl implements PayService {
    @Resource
    private AlipayManager alipayManager;

    @Override
    public String alipay(AlipayRequest alipayRequest) throws AlipayApiException, JsonProcessingException {
        return alipayManager.pay(alipayRequest);
    }
}
